home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / CIncludes / Notification.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-11  |  2.6 KB  |  115 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Notification.h
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8.  
  9.      Bugs?:        If you find a problem with this file, send the file and version
  10.                  information (from above) and the problem description to:
  11.  
  12.                      Internet:    apple.bugs@applelink.apple.com
  13.                      AppleLink:    APPLE.BUGS
  14.  
  15. */
  16.  
  17. #ifndef __NOTIFICATION__
  18. #define __NOTIFICATION__
  19.  
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. /*    #include <ConditionalMacros.h>                                */
  25.  
  26. #ifndef __OSUTILS__
  27. #include <OSUtils.h>
  28. #endif
  29. /*    #include <MixedMode.h>                                        */
  30. /*    #include <Memory.h>                                            */
  31.  
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35.  
  36. #if GENERATINGPOWERPC
  37. #pragma options align=mac68k
  38. #endif
  39.  
  40. #ifdef __CFM68K__
  41. #pragma lib_export on
  42. #endif
  43.  
  44. struct NMRec {
  45.     QElemPtr                        qLink;                        /*next queue entry*/
  46.     short                            qType;                        /*queue type -- ORD(nmType) = 8*/
  47.     short                            nmFlags;                    /*reserved*/
  48.     long                            nmPrivate;                    /*reserved*/
  49.     short                            nmReserved;                    /*reserved*/
  50.     short                            nmMark;                        /*item to mark in Apple menu*/
  51.     Handle                            nmIcon;                        /*handle to small icon*/
  52.     Handle                            nmSound;                    /*handle to sound record*/
  53.     StringPtr                        nmStr;                        /*string to appear in alert*/
  54.     UniversalProcPtr                nmResp;                        /*pointer to response routine*/
  55.     long                            nmRefCon;                    /*for application use*/
  56. };
  57. typedef struct NMRec NMRec, *NMRecPtr;
  58.  
  59. typedef pascal void (*NMProcPtr)(NMRecPtr nmReqPtr);
  60.  
  61. #if GENERATINGCFM
  62. typedef UniversalProcPtr NMUPP;
  63. #else
  64. typedef NMProcPtr NMUPP;
  65. #endif
  66.  
  67. enum {
  68.     uppNMProcInfo = kPascalStackBased
  69.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NMRecPtr)))
  70. };
  71.  
  72. #if GENERATINGCFM
  73. #define NewNMProc(userRoutine)        \
  74.         (NMUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppNMProcInfo, GetCurrentArchitecture())
  75. #else
  76. #define NewNMProc(userRoutine)        \
  77.         ((NMUPP) (userRoutine))
  78. #endif
  79.  
  80. #if GENERATINGCFM
  81. #define CallNMProc(userRoutine, nmReqPtr)        \
  82.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppNMProcInfo, (nmReqPtr))
  83. #else
  84. #define CallNMProc(userRoutine, nmReqPtr)        \
  85.         (*(userRoutine))((nmReqPtr))
  86. #endif
  87.  
  88. /* ------------------ */
  89.  
  90. #if !GENERATINGCFM
  91. #pragma parameter __D0 NMInstall(__A0)
  92. #endif
  93. extern pascal OSErr NMInstall(NMRecPtr nmReqPtr)
  94.  ONEWORDINLINE(0xA05E);
  95.  
  96. #if !GENERATINGCFM
  97. #pragma parameter __D0 NMRemove(__A0)
  98. #endif
  99. extern pascal OSErr NMRemove(NMRecPtr nmReqPtr)
  100.  ONEWORDINLINE(0xA05F);
  101.  
  102. #ifdef __CFM68K__
  103. #pragma lib_export off
  104. #endif
  105.  
  106. #if GENERATINGPOWERPC
  107. #pragma options align=reset
  108. #endif
  109.  
  110. #ifdef __cplusplus
  111. }
  112. #endif
  113.  
  114. #endif /* __NOTIFICATION__ */
  115.